package com.briup.jdbc;

import oracle.jdbc.driver.OracleDriver;

/**
 * 注册驱动
 * 注册驱动的前提是  驱动类加载
 *
 */
public class RegisterDriver {
    public static void main(String[] args) {

        //会让类加载
        try {
            Class.forName("oracle.jdbc.driver.OracleDriver");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        //创建对象 会让类加载
        OracleDriver driver = new OracleDriver();
    }
}
